package com.example.idachuappone.index.item;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.example.idachuappone.R;
import com.example.idachuappone.index.ui.MyListView;
import com.example.idachuappone.person.adapter.HelpAdapter;
import com.example.idachuappone.person.entity.Help;

public class FamilyFeastHelpActivity extends Activity implements OnClickListener {
	private HelpAdapter adapter;
	private Button btn_back;
	private List<Help> listHelps;
	private MyListView listView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_family_feast_help);
		initView();
	}

	private void initView() {
		this.btn_back = (Button) findViewById(R.id.btn_back);
		this.btn_back.setOnClickListener(this);
		this.listView = (MyListView) findViewById(R.id.listView1);
		this.adapter = new HelpAdapter(this);
		this.listView.setAdapter(this.adapter);
		initData();
		initAdapter();
	}

	private void initData() {
		Help help1 = new Help(
				"\u4ec0\u4e48\u662f\u5bb6\u5bb4\uff1f",
				"\u5bb6\u5bb4\u662f\u4e13\u4e3a\u9ad8\u7aef\u5ba2\u6237\u63d0\u4f9b\u7684\u4e2a\u6027\u5316\u5b9a\u5236\u9910\u996e\u670d\u52a1\uff0c\u7231\u5927\u53a8\u51fa\u54c1\u90e8\u4f1a\u6839\u636e\u5ba2\u6237\u7684\u4e2a\u6027\u5316\u9700\u6c42,\u5b9a\u5236\u79c1\u4eba\u83dc\u5355\uff0c\u53cc\u65b9\u786e\u8ba4\u540e\uff0c\u53a8\u5e08\u56e2\u961f\u5c06\u4e0a\u95e8\u670d\u52a1\u3002");
		Help help2 = new Help(
				"\u5bb6\u5bb4\u6709\u4ec0\u4e48\u7c7b\u522b\uff1f",
				"\u7231\u5927\u53a8\u4e3a\u60a8\u63d0\u4f9b\u5bb6\u5ead\u8fdb\u9910\u3001\u670b\u53cb\u805a\u4f1a\u3001\u516c\u53f8\u805a\u9910\u548c\u81ea\u52a9\u5bb6\u5bb4\u7b49\u670d\u52a1\uff0c\u5982\u679c\u4f60\u8fd8\u6709\u5176\u4ed6\u4e2a\u6027\u5316\u9700\u6c42\uff0c\u5c06\u7531\u5ba2\u6237\u4e13\u5458\u63d0\u4f9b\u652f\u6301\uff1b");
		Help help3 = new Help(
				"\u5bb6\u5bb4\u7684\u670d\u52a1\u6d41\u7a0b\u662f\u4ec0\u4e48\uff1f",
				"1\uff09\u7528\u6237\u4e0b\u5355\u9884\u7ea6\uff0c\u5927\u5ba2\u6237\u4e13\u5458\u8054\u7cfb\u5e76\u786e\u8ba4\uff1b\n2\uff09\u4e13\u5458\u79ef\u6781\u4e0e\u7528\u6237\u6c9f\u901a\uff0c\u6700\u7ec8\u8fbe\u6210\u83dc\u5355\uff1b\n3\uff09\u7b7e\u8ba2\u5408\u540c\uff0c\u5e76\u652f\u4ed8\u8ba2\u91d1\uff1b\n4\uff09\u53a8\u5e08\u56e2\u961f\u4e0a\u95e8\u670d\u52a1\uff0c\u6536\u53d6\u5c3e\u6b3e\uff1b");
		Help help4 = new Help(
				"\u5bb6\u5bb4\u7684\u9910\u5177\u5982\u4f55\u6536\u8d39\uff1f",
				"\u5982\u679c\u662f\u7231\u5927\u53a8\u63d0\u4f9b\u9910\u5177\u7684\u8bdd\uff0c\u9910\u5177\u5c06\u4f1a\u6536\u8d39300\u5143\uff1b");
		Help help5 = new Help("\u5bb6\u5bb4\u7684\u4ef7\u683c\u662f\u5982\u4f55\u786e\u5b9a\u7684\uff1f",
				"\u5bb6\u5bb4\u7684\u4ef7\u683c\u662f1288\u5143\u8d77\uff1b");
		Help help6 = new Help("\u5bb6\u5bb4\u7684\u53a8\u5e08\u56e2\u961f\u662f\u5982\u4f55\u6784\u6210\u7684\uff1f",
				"\u7231\u5927\u53a8\u5c06\u4f1a\u63d0\u4f9b\u81f3\u5c112\u540d\u53a8\u5e08\u4e0a\u95e8\u670d\u52a1\uff1b");
		Help help7 = new Help(
				"\u5bb6\u5bb4\u4f1a\u63d0\u4f9b\u98df\u6750\u4e48\uff1f",
				"\u98df\u6750\u53ef\u4ee5\u81ea\u5df1\u63d0\u4f9b\uff0c\u6216\u7231\u5927\u53a8\u4ee3\u4e70\u98df\u6750\uff0c\u4ee3\u4e70\u98df\u6750\u9700\u8981\u62a5\u9500\u98df\u6750\u8d39\u7528\uff1b");
		Help help8 = new Help(
				"\u5bb6\u5bb4\u670d\u52a1\u4e2d\u5305\u62ec\u9910\u540e\u53a8\u623f\u53a8\u5177\u6574\u7406\u4e48\uff1f",
				"\u53a8\u5e08\u56e2\u961f\u5c06\u4f1a\u5728\u9910\u540e\u6574\u7406\u53a8\u623f\uff0c\u6062\u590d\u539f\u72b6\uff1b");
		this.listHelps = new ArrayList();
		this.listHelps.add(help1);
		this.listHelps.add(help2);
		this.listHelps.add(help3);
		this.listHelps.add(help4);
		this.listHelps.add(help5);
		this.listHelps.add(help6);
		this.listHelps.add(help7);
		this.listHelps.add(help8);
	}

	private void initAdapter() {
		this.adapter.setList(this.listHelps);
		this.adapter.notifyDataSetChanged();
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_back /* 2131165198 */:
			finish();
		default:
		}
	}
}